<?php echo $this->render('user/head.phtml');?>
<script src="/static/jqueryui/ui/jquery.ui.mouse.js"></script>
<script src="/static/jqueryui/ui/jquery.ui.selectable.js"></script>
	<style>
	#feedback { font-size: 1.4em; }
	#selectable .ui-selecting { background: #FECA40; }
	#selectable .ui-selected { background: #F39814; color: white; }
	#selectable { list-style-type: none; margin: 0; padding: 0; //width: 60%; }
	#selectable li { //margin: 3px; //padding: 0.4em; //font-size: 1em; //width: 60px;//text-align: center;//height: 18px;//float: left; //border: 1px solid gray;}
	</style>
	<script>
	$(function() {
		$( "#selectable" ).selectable();
	});
	</script>

<!-- <h1>上传课程</h1> -->
<!-- 上传课程 -->
<form enctype='multipart/form-data' action='?' method='post'>
  <table id='table_upload'>
    <tr class='odd'>
      <td>选择文件：</td>
    </tr>
    <tr>
      <td><input type='file' name='file_upload' value='选择文件'/></td>
    </tr>
    <tr class='odd'>
      <td>标题：</td>
    </tr>
    <tr>
      <td><input id='upload_input_title' type='test' name='title'/></td>
    </tr>
    <tr class='odd'>
      <td class='odd'>描述：</td>
    </tr>
    <tr>
      <td><textarea id='upload_input_desc' name='desc'></textarea></td>
    </tr>
    <!-- <tr class='odd'> -->
    <!--   <td>分类：</td> -->
    <!-- </tr> -->
    <!-- <tr> -->
    <!--   <td> -->
    <!-- 	<input type='hidden' id='input_hidden_cat' name='cat'/> -->
    <!-- 	<ol id="selectable"> -->
    <!-- 	<?php foreach ($this->categories as $category){ ?> -->
    <!-- 	<li class="input_cat" name='<?php echo $category->id;?>'> -->
    <!-- 	  <?php echo $category->name;?> -->
    <!-- 	</li> -->
    <!-- 	<?php }?> -->
    <!-- 	</ol> -->
    <!--   </td> -->
    <!-- </tr> -->
    <!-- <tr class='odd'> -->
    <!--   <td> -->
    <!-- 	关键字： -->
    <!--   </td> -->
    <!-- </tr> -->
    <!-- <tr> -->
    <!--   <td id='td_cat_tags'> -->
    <!-- 	<input type='text' id='tag1' class='input_tag' size='6'/> -->
    <!-- 	<input type='text' id='tag2' class='input_tag' size='6'/> -->
    <!-- 	<input type='text' id='tag3' class='input_tag' size='6'/> -->
    <!--   </td> -->
    <!-- </tr> -->
    <tr class='odd'>
      <td>分类：</td>
    </tr>
    <tr>
      <td>
        <select name="cat">
	  <?php print make_options($this->categories);?>
        </select>
      </td>
    </tr>
    <tr class='odd'>
      <td>
	关键字：
      </td>
    </tr>
    <tr>
      <td id='td_cat_tags'>
	<input type='text' name='tag1' class='input_tag' size='10' value=""/>
	<input type='text' name='tag2' class='input_tag' size='10' value=""/>
	<input type='text' name='tag3' class='input_tag' size='10' value=""/>
      </td>
    </tr>

    <tr>
      <td>
        <input id="input_cont_tags" name='input_cont_tags' type='hidden'/>
      </td>
    </tr>  
    <tr class='odd'>
      <td>
	价格：
      </td>
    </tr>
    <tr>
      <td>
	<input type='text' name='ori_price'/>
      </td>
      <td>
	收看一次的价格，重复收看不另外计费。
      </td>
    </tr>
    <tr class='odd'>
      <td>
	促销价格：
      </td>
    </tr>
    <tr>
      <td>
	<input type='text' name='dis_price'/>
      </td>
    </tr>
    <tr>
      <td>
      </td>
    </tr>
    <tr>
      <td>
	<input type='submit' id='submit_upload_file' value='上传文件'/>
      </td>
    </tr>

  </table>
</form>

<?php
   if (count($this->messages) > 0)
foreach($this->messages as $msg)
print $msg.'<br/>';

?>

<a href='/user/courses'>查看课程</a>
<?php echo $this->render('user/foot.phtml');?>
